package cn.edu.sptc.LiXin.hellosprring.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
public class HelloController {
    @GetMapping("/hello")
//    @RequestMapping(value = "/hello",method = RequestMethod.GET)
    @ResponseBody
    public String helloWorld(@RequestParam(required = false,defaultValue = "张三") String name) {
        return "Hello world" + name + "!";
    }
}
